<?php
defined('BASEPATH') OR exit('No direct script access allowed');

/**
 * 附件、上传相关配置文件
 *
 * 主要包括几个部分: 云上传配置，上传限制
 *
 * @author 	Jason
 * @date	2017年5月22日 上午11:54:48
 */

/*
 |--------------------------------------------------------------------------
 | Qiniu Configuration
 |--------------------------------------------------------------------------
 |
 | 七牛云配置
 |
 */
$config['qiniu'] = [
		'access_key'=>'mMw3xgtAyx-soED3svHa8CAIjFQczGC7rpWY9YTM',
		'secret_key'=>'ceYeFlILFkpy3kSlqAnHp1DJBFozBuPeoajHq8Ea',
		'bucket_name_base'=>'segway-d',
		'domain_base'=>'http://oosrrnck1.bkt.clouddn.com/',
];

/*
 |--------------------------------------------------------------------------
 | Common Params
 |--------------------------------------------------------------------------
 |
 | 文件上传公共限制参数
 |
 */
$config['common'] = [
		'upload_path' => '/path/to/User/Generated/Content/uploads',
		'allowed_types' => 'jpg|jpeg|gif|png|bmp|doc|docx|ppt|pptx|xls|xlsx|pdf|txt|zip|rar|avi|doc|docx|m4a|mov|mp3|mp4|mpeg|pdf|ppt|pptx|psd|rar|txt|wav|wma|wmv|xlsx|xml|zip',
		'file_ext_tolower' => true,
		'overwrite' => false, 		// default
		'max_size' => 8192, // 单位 KB
		'encrypt_name' => false, 	// default
		'remove_spaces' => true, 	// default
		'detect_mime' => true, 		// default
		'mod_mime_fix' => true, 	// default
];

/*
 |--------------------------------------------------------------------------
 | Image Params
 |--------------------------------------------------------------------------
 |
 | 图片上传限制参数 - CI_Upload Library
 |
 */
$config['image'] = [
		'upload_path' => '/tmp/qiniu',
		'upload_path' => '/tmp/',
		'allowed_types' => 'jpg|jpeg|gif|png',
		'max_size' => 4096, // 单位 KB
		'encrypt_name' => true, // 随机的字符串
];
$config['image'] = array_merge($config['common'], $config['image']);
